import TileGrid from "ol/tilegrid/TileGrid"
import useProjection from "./useProjection"
import useResolution from "./useResolution"

export default function(){

    const {
        proj4326
    } = useProjection()

    const {
        resolutions4326
    } = useResolution()

    

    const tileGrid = new TileGrid({
        origin: [-180, 90],
        tileSize: [256, 256],
        extent: proj4326?.getExtent(),
        resolutions: resolutions4326,
    })

    return {
        tileGrid
    }
}